Computed Tomography Pulmonary Angiography (CTPA) are medical diagnostic tests that use computed tomography (CT) to obtain an image of the pulmonary arteries, for purposes of diagnosing pulmonary thromboembolic disease (PE). Prior to undergoing a CTPA, contrast agent is injected into the subject, based on a contrast injection function, to produce a desired enhancement pattern of a region of interest (ROI) within the pulmonary arteries. Bolus shaping is a technique of determining the contrast injection function, in order to produce the desired enhancement pattern. Various conventional methods of bolus shaping are known, including an exponentially decelerated injection (EDI) function derived from a complex compartment model and a bi-phasic or multi-phasic injection using a discrete Fourier transform (DFT) approach.